<div ms-controller="art">
    <div class="container">
        <div class="row">
            <div class="col-md-8 col-md-offset-2">
                <div ms-if="info.AuthorUID==thisUID" class="ctrl pull-right ">
                    <a class="btn btn-sm btn-primary card" ms-attr-href='"#!/edit/"+info.ArticleID'>编辑</a>
                    <button class="btn btn-sm card" ms-click="del">删除</button>
                </div>
                <div class="card art-content">
                    <p>
                        {{info.Title}}
                        <small class="pull-right">
                            {{info.LTime * 1000 | date("yyyy.MM.dd")}}
                        </small>
                    </p>
                    <hr/>
                    <div >
                        {{info.HTML|html}}
                    </div>
                </div>
                <!--发起评论-->
                <br/>
                <div id="btnReply"></div>
                <br/>
                <div  class="reply-btn" ms-click="editorInit" ms-if="!editing">
                    发起评论
                </div>

                <div ms-if="editing">
                    <div ms-widget="MDEditor,replyEditor,replyOpt"></div>
                    <br/>

                    <button class="btn btn-primary btn-large pull-right" ms-click="reply">发表评论</button>
                </div>
                <br/>
                <!--评论列表-->
                共 {{replyList.length}} / {{replyTotal}} 条评论：
                <div class="card art-content" ms-repeat="replyList">
                    <div>
                        <b>#{{$index+1}}&nbsp;</b>
                    <b>{{el.CommentUser.UserName}}</b>
                        {{el.Time * 1000 | date("yyyy.MM.dd hh:mm:ss")}}
                       <button class="btn btn-primary btn-xs pull-right" ms-click="editorInit($index)">回复</button>
                    </div>
                    <hr/>
                    <p>
                        {{el.ContentHtml|html}}
                    </p>
                </div>
                <br/>
                <button ms-if="!gettingMore" class="btn btn-block btn-large btn-default" ms-click="moreReply">加载更多评论</button>


            </div>
        </div>
    </div>
</div>